<?php

namespace app\api\controller;

use app\api\model\Member;
use app\common\controller\Frontend;

class Order extends Frontend
{
    protected array $noNeedLogin = [];


    public function initialize(): void
    {
        parent::initialize();
    }


    /**
     * 预约景区
     * @throws Throwable
     */
    public function scenicOrder()
    {
       return json((new \app\api\model\Order())->scenicOrder($this->request_array));
    }


    /**
     * 预约民宿
     * @throws Throwable
     */
    public function hotelOrder()
    {
        return json((new \app\api\model\Order())->hotelOrder($this->request_array));
    }



    /**
     * 民宿订单列表
     * @throws Throwable
     */
    public function getHotelOrderList()
    {
        return json((new \app\api\model\Order())->getHotelOrderList($this->request_array));
    }


    /**
     * 景区订单列表
     * @throws Throwable
     */
    public function getScenicOrderList()
    {
        return json((new \app\api\model\Order())->getScenicOrderList($this->request_array));
    }


    /**
     * 民宿订单详情
     * @throws Throwable
     */
    public function getHotelOrderDetail()
    {
        return json((new \app\api\model\Order())->getHotelOrderDetail($this->request_array));
    }


    /**
     * 景区订单详情
     * @throws Throwable
     */
    public function getScenicOrderDetail()
    {
        return json((new \app\api\model\Order())->getScenicOrderDetail($this->request_array));
    }



    /**
     * 取消订单
     * @throws Throwable
     */
    public function canelOrder(){
        return json((new \app\api\model\Order())->canelOrder($this->request_array));
    }

    /**
     * 自动改民宿订单/景区订单
     * @throws Throwable
     */
    public function autoHotelOrder(){
        return json((new \app\api\model\Order())->autoHotelOrder($this->request_array));

    }



}
